SKIFFTEN - alias SKIFF10

Category: PUR120
Computer: Amstrad CPC464 
Basic: Locomotive Basic 1.1
Emulator: WinAPE 2.0 Beta 2
Author: Francesco Fiorentini (Italy)

Instructions to load the game:
- run WinAPE 2.0 Beta 2
- File -> Disc A: -> Insert Disc Image
- Select the file SKIFF10.DSK
- digit the command: cat (to see the content of the disk)
- digit the command: load "SKIFF10.BAS" (to load the file MN10ZUMA.BAS)
- digit the command: run (to execute the game)

Game instructions: 
- ski down the mountain
- avoid trees, rocks and the lateral borders
- passing through the gates give an extra bonus
- move the main character with the arrow keys (left and right)

Code:
1 SYMBOL 254,64,112,124,126,64,64,64,64:SYMBOL 255,24,60,24,126,24,255,24,24:SYMBOL 253,0,0,0,24,60,124,127,255:RC=0
2 K=1:G=0:P=0:D=0:X=18:SX=18:S$=CHR$(248):F$=CHR$(254):T$=CHR$(255):MODE 1:PAPER 0:BORDER 26:INK 0,26:INK 1,0:CLS
3 IF P>1000 THEN B=INT(RND(1)*35+1):PEN 1:LOCATE B,25:? CHR$(253)
4 B=INT(RND(1)*35+1):PEN 1:LOCATE B,25:? T$:IF D=15 THEN C=INT(RND(1)*(30-5)+5):PEN 3:LOCATE C,25:? F$;"____";F$:D=0 
5 LOCATE 1+K,25:? CHR$(207):LOCATE 40-K,25:? CHR$(207):LOCATE 40,25:?" ":P=P+10:IF D<8 THEN K=D ELSE K=D-(D-K)-1
6 SX = SX + (INKEY(8) > -1 ) - (INKEY(1) > -1)
7 LOCATE SX,1:R$=COPYCHR$(#0):IF R$=T$ OR R$=CHR$(253) OR R$=CHR$(207) THEN GOTO 9 ELSE IF R$="_" THEN G=G+1
8 PEN 1:? S$:D=D+1:GOTO 3
9 PAPER 1:PEN 3:LOCATE 1,5:?"MORTO! PERCORSI:";P;"mt. e:";G;"porte ":P=P+G*50:? "PUNTEGGIO: ";P:IF P>RC THEN RC=P
10 LOCATE 1,8:? "RECORD:";RC:FOR I=1 TO 3000:NEXT I:GOTO 2

Code Explanation:
row 1: redefines the characters of flag, tree and rock
row 2: initializes variables, defines the graphic mode and the colours in the game
row 3: manages the rocks to appear randomly but only after 1000 meters
row 4: displays trees and the gate (flags); gates are designed with a gap of 15 linees
row 5: displays the lateral borders; they appear with a sinusoidal effect
row 6: manages the movement of the main character using the left and right arrow keys
row 7: manages the collision using the COPYCHR$(); in case of a collision with rocks, trees or lateral border jumps to line 9
row 8: displays the main character and jump back to line 3 to execute the cycle again
row 9: displays the death message and the points collected; the points are calculated adding the distance plus a bonus for the gates
row 10: displays the game record (since the game started) and after a while restarts the game